package com.lcxsoft.orderservice.mapper;

import com.lcxsoft.orderservice.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import java.math.BigDecimal;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lcx
 * @since 2022-01-22
 */
@Mapper
public interface OrdersMapper extends BaseMapper<Orders> {

    Integer countOrdersByTime(@Param("beginDate") String beginDate, @Param("endDate") String endDate);

    BigDecimal countOdersMoneyByTime(@Param("beginDate") String beginDate, @Param("endDate") String endDate);

    Integer countOrdersByTimeAndSchoolId(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("schoolId") String schoolId);

    BigDecimal countOdersMoneyByTimeAndSchoolId(@Param("beginDate") String beginDate, @Param("endDate") String endDate, @Param("schoolId") String schoolId);
}
